<?php

$con=mysqli_connect("localhost","root","admin");
// Check connection
if (mysqli_connect_errno())
  {
  echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }

// Create TEACHER table
$sql= "CREATE TABLE HOPEWw.Teacher(
  teacher_ID INT NOT NULL AUTO_INCREMENT ,
  ECD_code INT NOT NULL,
  session_id INT NOT NULL,
  session_date DATE NOT NULL,
  teacher_Name VARCHAR (20) NOT NULL,
  teacher_Surname VARCHAR (20) NOT NULL,
  teacher_contactNum VARCHAR (20) NOT NULL,
  teacher_PreTest_score INT NOT NULL,
  teacher_PreTest_percent FLOAT(3,2) NOT NULL,
  teacher_PostTest_score INT NOT NULL,
  teacher_PostTest_percent FLOAT(3,2) NOT NULL,
  teacher_Test_difference FLOAT(3,2) NOT NULL,
  
  
  PRIMARY KEY (TEACHER_ID )
   )";
// Execute query
if (mysqli_query($con,$sql))
  {
  echo "Table TEACHER created successfully";
  }
else
  {
  echo "Error creating table: " . mysqli_error($con);
  }
?>
